<template>
  <div>
   <ul>
    <li v-for="(item,index) in list" :key="index">{{ item }}

     <button @click="del(index)">删除</button>
    </li>
    
   </ul>
   <button @click="add">生成</button>
  </div>
</template>

<script>
export default {
 data() { 
  return{
    list: [1,5,3]
  }
 },
 methods :{
  add() {
  return this.list.push(Math.floor(Math.random() * 90))
  },
  del(e) {
   this.list.splice(e,1)
  }
 }
}
</script>

<style>

</style>